/** ***********begin*******************/
/**
 * 组件类型
 *
 * 组件类型名称首字母大写，同时组件名称也要首字母大写，进行动态引入时进行判断
 */
// 组件前缀
const COMPONENT_PREFIX = 'XRender'
// 基础组件
const FORM = COMPONENT_PREFIX + 'Form'
const FORM_ITEM = COMPONENT_PREFIX + 'FormItem'
const TABLE = COMPONENT_PREFIX + 'Table'
const ERROR = COMPONENT_PREFIX + 'Error'
const INPUT = COMPONENT_PREFIX + 'Input'
const INPUT_BUTTON = COMPONENT_PREFIX + 'InputButton'
const INPUT_NUMBER = COMPONENT_PREFIX + 'InputNumber'
const INPUT_SEARCH = COMPONENT_PREFIX + 'InputSearch'
const TEXTAREA = COMPONENT_PREFIX + 'Textarea'
const TEXTAREA_BUTTON = COMPONENT_PREFIX + 'TextareaButton'
const SELECT = COMPONENT_PREFIX + 'Select'
const SELECT_MULTIPLE = COMPONENT_PREFIX + 'SelectMultiple'
const SLIDER = COMPONENT_PREFIX + 'Slider'
const SLIDER_DOUBLE = COMPONENT_PREFIX + 'SliderDouble'
const SWITCH = COMPONENT_PREFIX + 'Switch'
const RATE = COMPONENT_PREFIX + 'Rate'
const RADIO = COMPONENT_PREFIX + 'Radio'
const CHECK_BOX = COMPONENT_PREFIX + 'CheckBox'
const RADIO_BUTTON = COMPONENT_PREFIX + 'RadioButton'
const DATE_PICKER = COMPONENT_PREFIX + 'DatePicker'
const DATE_TIME_PICKER = COMPONENT_PREFIX + 'DateTimePicker'
const TIME_PICKER = COMPONENT_PREFIX + 'TimePicker'
const MONTH_PICKER = COMPONENT_PREFIX + 'MonthPicker'
const RANGE_PICKER = COMPONENT_PREFIX + 'RangePicker'
const CASCADER = COMPONENT_PREFIX + 'Cascader'
const LABEL = COMPONENT_PREFIX + 'Label'
const HTML = COMPONENT_PREFIX + 'Html'
const TREE_SELECT = COMPONENT_PREFIX + 'TreeSelect'
const UPLOAD_IMAGE = COMPONENT_PREFIX + 'UploadImage'
const UPLOAD_FILE = COMPONENT_PREFIX + 'UploadFile'
const EXTEND_SLOT = COMPONENT_PREFIX + 'ExtendSlot'
const DRAGGABLE = COMPONENT_PREFIX + 'Draggable'

/** ***********end*******************/

/** ***********begin*******************/
// 自定义的事件类型，采用中划线的方式
// 这些事件都是在$emit中使用的事件

// 组件change事件
const CHANGE = 'change'
// 自定义事件
const CUSTOM_EVENT = 'custom-event'
// 表单发生变化事件
const FORM_CHANGE = 'form-change'
// 表单提交事件
const FORM_SUBMIT = 'form-submit'
// 表格事件
const TABLE_CHANGE = 'table-change'
// 表格分页事件
const TABLE_PAGE_CHANGE = 'table-page-change'
// 表格选中事件
const TABLE_SELECTED = 'table-selected'
/** ***********end*******************/

/** ***********begin*******************/
// 自定义的事件类型 采用驼峰的方式
// 这些是事件的类型type 都在  custom-event 事件中进行标识事件类型
// 搜索事件
const SEARCH_EVENT = 'SearchEvent'
// 移除事件
const REMOVE_EVENT = 'RemoveEvent'
// text 按下回车的回调
const PRESS_ENTER_EVENT = 'PressEnterEvent'
// button click时间
const BUTTON_CLICK_EVENT = 'ButtonClickEvent'
// 关联字段更新事件
const ASSOCIATION_CHANGE_EVENT = 'AssociationChangeEvent'
// 上传事件
const UPLOAD_EVENT = 'UploadEvent'
// 上传change事件
const UPLOAD_CHANGE_EVENT = 'UploadChangeEvent'
// 按钮事件
const BTN_EVENT = 'BtnEvent'
/** ***********end*******************/

/** ***********begin*******************/
//全局方法名称
// 查看PDF
const OPTION_VIEW_PDF = 'viewPdf'
// 删除文件
const OPTION_REMOVE_FILE = 'removeFile'
// 上传文件
const OPTION_UPLOAD_FILE = 'uploadFile'
// 文件列表
const OPTION_LIST_FILE = 'listFile'
/** ***********end*******************/

/** ***********begin*******************/
//布局类型

const LAYOUT_PREFIX = 'Layout'
// 分割线
const LAYOUT_DIVIDER = COMPONENT_PREFIX + LAYOUT_PREFIX + 'Divider'
// 折叠面板
const LAYOUT_COLLAPSE = COMPONENT_PREFIX + LAYOUT_PREFIX + 'Collapse'
// 卡片
const LAYOUT_CARD = COMPONENT_PREFIX + LAYOUT_PREFIX + 'Card'
// 标签页
const LAYOUT_TABS = COMPONENT_PREFIX + LAYOUT_PREFIX + 'Tabs'
// 步骤条
const LAYOUT_STEPS = COMPONENT_PREFIX + LAYOUT_PREFIX + 'Steps'
// 布局插槽
const LAYOUT_SLOT = COMPONENT_PREFIX + LAYOUT_PREFIX + 'Slot'
// 按钮
const LAYOUT_BUTTON = COMPONENT_PREFIX + LAYOUT_PREFIX + 'Button'
/** ***********end*******************/

/**
 * 组件类型
 */
export const COMPONENT_TYPE = {
  // 组件方法
  EXTEND_SLOT,
  // 基础组件
  ERROR,
  INPUT,
  INPUT_BUTTON,
  INPUT_NUMBER,
  INPUT_SEARCH,
  TEXTAREA,
  SELECT,
  SELECT_MULTIPLE,
  SLIDER,
  SLIDER_DOUBLE,
  SWITCH,
  RADIO,
  CHECK_BOX,
  RADIO_BUTTON,
  DATE_PICKER,
  DATE_TIME_PICKER,
  MONTH_PICKER,
  TIME_PICKER,
  RANGE_PICKER,
  RATE,
  CASCADER,
  TREE_SELECT,
  LABEL,
  HTML,
  UPLOAD_IMAGE,
  UPLOAD_FILE,
  TEXTAREA_BUTTON,
  DRAGGABLE,
  // 表单
  FORM,
  FORM_ITEM,
  // 表格
  TABLE,
  // 布局组件
  LAYOUT_DIVIDER,
  LAYOUT_COLLAPSE,
  LAYOUT_CARD,
  LAYOUT_TABS,
  LAYOUT_STEPS,
  LAYOUT_SLOT,
  LAYOUT_BUTTON
}

/**
 *自定义的事件类型
 */
export const CUSTOM_EVENT_TYPE = {
  FORM_CHANGE,
  FORM_SUBMIT,
  CUSTOM_EVENT,
  REMOVE_EVENT,
  CHANGE,
  SEARCH_EVENT,
  PRESS_ENTER_EVENT,
  BUTTON_CLICK_EVENT,
  ASSOCIATION_CHANGE_EVENT,
  UPLOAD_EVENT,
  UPLOAD_CHANGE_EVENT,
  TABLE_CHANGE,
  TABLE_PAGE_CHANGE,
  TABLE_SELECTED,
  BTN_EVENT
}

/**
 * slot包装后缀名称
 */
export const SLOT_WRAPPER_SUFFIX = 'Wrapper'
/**
 * slot的前缀名称
 * 有此前缀的slot才会被进行渲染
 */
export const SLOT_PREFIX = COMPONENT_PREFIX
/**
 * 设计组件的后缀名称
 */
export const DESIGN_COMPONENT_SUFFIX = 'Design'
/**
 *全局参数名称
 *
 */
export const RENDER_OPTIONS = {
  VIEW_PDF: OPTION_VIEW_PDF,
  REMOVE_FILE: OPTION_REMOVE_FILE,
  UPLOAD_FILE: OPTION_UPLOAD_FILE,
  LIST_FILE: OPTION_LIST_FILE
}
